/**
 * 
 */
package hawk.example.juni5;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import hawk.example.WebClient;
import hawk.example.WebServerExtension;

/**
 * @author Hawk
 *
 */
public class WebServerDemo {
	@RegisterExtension
	static WebServerExtension server = WebServerExtension.builder().enableSecurity(false).build();

	@Test
	void getProductList() {
		WebClient webClient = new WebClient();
		String serverUrl = server.getServerUrl();
		// Use WebClient to connect to web server using serverUrl and verify response
		assertEquals(200, webClient.get(serverUrl + "/products").getResponseStatus());
	}
}
